package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class Statistics {
    /**
     * 统计编号
     */
    private int sId;
    /**
     * 当前注册用户总数
     */
    private int userCount;
    /**
     * 当前发布职位总数
     */
    private int jobCount;
    /**
     * 当前用户反馈总数
     */
    private int feedbackCount;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;
    /**
     * 最后更新时间
     */
    private Date updatedAt;

    // 构造方法
    public Statistics() {}
    public Statistics(int sId, int userCount, int jobCount, int feedbackCount, Date createTime, int state, Date updatedAt) {
        this.sId = sId;
        this.userCount = userCount;
        this.jobCount = jobCount;
        this.feedbackCount = feedbackCount;
        this.createTime = createTime;
        this.state = state;
        this.updatedAt = updatedAt;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("sId","s_id");
        map.put("userCount","user_count");
        map.put("jobCount","job_count");
        map.put("feedbackCount","feedback_count");
        map.put("createTime","create_time");
        map.put("state","state");
        map.put("updatedAt","updated_at");
        return map;
    }

    // 属性
    public int getsId() {
        return sId;
    }

    public void setsId(int sId) {
        this.sId = sId;
    }

    public int getUserCount() {
        return userCount;
    }

    public void setUserCount(int userCount) {
        this.userCount = userCount;
    }

    public int getJobCount() {
        return jobCount;
    }

    public void setJobCount(int jobCount) {
        this.jobCount = jobCount;
    }

    public int getFeedbackCount() {
        return feedbackCount;
    }

    public void setFeedbackCount(int feedbackCount) {
        this.feedbackCount = feedbackCount;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    /**
     * 打印数据统计表
     * @return
     */
    @Override
    public String toString() {
        return "Statistics{" +
                "sId=" + sId +
                ", userCount=" + userCount +
                ", jobCount=" + jobCount +
                ", feedbackCount=" + feedbackCount +
                ", createTime=" + createTime +
                ", state=" + state +
                ", updatedAt=" + updatedAt +
                '}';
    }
}
